package com.hushao.lims.weblims.repository;

import com.hushao.lims.weblims.domain.ConsumableStorage;
import com.hushao.lims.weblims.domain.TeacherInfo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * @author 930588706
 * @date 18/1/22
 */
public interface ConsumableStorageRepository extends JpaRepository<ConsumableStorage,Long> {

    /**
     * 根据耗材名称模糊查询个人耗材入库
     * @param teacherInfo
     * @param consumableName
     * @param pageable
     * @return
     * @throws Exception
     */
    Page<ConsumableStorage> findByTeacherInfoAndConsumableInfo_ConsumableNameLike(TeacherInfo teacherInfo, String consumableName, Pageable pageable) throws Exception;

    Page<ConsumableStorage> findByConsumableInfo_ConsumableNameLikeAndConsumableStorageStateLike(String consumabele, String state, Pageable pageable);
}
